﻿using FieldTools.Client.Entity.Model;
using FieldTools.Client.Model.Base;
using System.Collections.ObjectModel;

namespace FieldTools.Client.Model.Window
{
    /// <summary>
    /// http服务端模型
    /// </summary>
    public class HttpServerModel : BaseModel
    {
        public HttpServerModel() : base(System.Reflection.MethodBase.GetCurrentMethod()?.DeclaringType.Name)
        {
        }

        private string? port;
        /// <summary>
        /// 端口
        /// </summary>
        public string? Port
        {
            get { return port; }
            set { port = value; this.SavaConfigAndRaisePropertyChanged(this, nameof(Port), value); }
        }

        private string? timeOut = "5000";
        /// <summary>
        /// 超时时间
        /// </summary>
        public string? TimeOut
        {
            get { return timeOut; }
            set { timeOut = value; this.SavaConfigAndRaisePropertyChanged(this, nameof(TimeOut), value); }
        }

        private string? outText;
        /// <summary>
        /// 输出文本
        /// </summary>
        public string? OutText
        {
            get { return outText; }
            set { outText = value; this.SavaConfigAndRaisePropertyChanged(this, nameof(OutText), value); }
        }

        private ObservableCollection<CustomApi> customApis;
        /// <summary>
        /// 自定义api集合
        /// </summary>
        public ObservableCollection<CustomApi> CustomApis
        {
            get { return customApis; }
            set { customApis = value; this.SavaConfigAndRaisePropertyChanged(this, nameof(CustomApis), value); }
        }

    }
}
